/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uggerhøjbiler;

import DBLayer.DBActor;
import DBLayer.DBOrderLine;
import DBLayer.DBProduct;
import ModelLayer.Actor;
import ModelLayer.Car;
import ModelLayer.CarColor;
import ModelLayer.CarEngine;
import ModelLayer.OrderLine;
import ModelLayer.Product;
import ControlLayer.GlobalInstances;
import ControlLayer.HelperMethods;
import java.util.ArrayList;

/**
 *
 * @author Evil
 */
public class Main
{
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {

//        DBProduct DBproduct = new DBProduct();
//        ArrayList<Product> products = DBproduct.getObjects();
//
//        for (Product product : products)
//        {
//            System.out.println(product.getProductID());
//        }
        //-------------------------

        //ActorController act = new ActorController();
        //act.getSupplier(1);

//        Employee emp = new Employee();
//        emp.setUsername("Moulde");
//        emp.setPassword("12345");
//        emp.setSalary(80000);
//
//        Actor actor = new Actor();
//        actor.addRole(emp);
//
//        System.out.println("Is employee " + actor.isRolePresent(Role.Employee));
//        System.out.println("Is customer " + actor.isRolePresent(Role.Customer));
//        System.out.println("Is supplier " + actor.isRolePresent(Role.Supplier));
//
//        Employee actorEmployee = (Employee)actor.getRole(Role.Employee);
//
//        System.out.println("salary " + actorEmployee.getSalary());

//        ArrayList<Actor> actors = new ArrayList<Actor>();
//
//        DBActor actorDB = new DBActor();
////        DBOrderLine orderlineDB = new DBOrderLine();
////
////        ArrayList<OrderLine> orderlines = orderlineDB.getOrderLinesByOrderID(1);
////        System.out.println("OrderLines fra id: 1");
////        for (OrderLine orderlin : orderlines)
////        {
////            System.out.println("productid: " + orderlin.getProduct().getProductID());
////        }
//////
//        DBActor actorDB = new DBActor();
//        actors = actorDB.getObjects();
//
//        for (Actor actor : actors)
//        {
//            System.out.println(actor.getName() + " " + actor.getCountry() + "");
//        }

//        Actor actor = actorDB.getObject(7);
//        System.out.println(actor.getActorID());
//        System.out.println(actor.getAddress());
//        System.out.println(actor.getCity());
//        System.out.println(actor.getCountry());
//        System.out.println(actor.getName());
//        System.out.println(actor.getPhonenumber());
//        System.out.println(actor.getZipCode());
//
//        System.out.println("----------- employee");
//
//        DBEmployee employeeDB = new DBEmployee();
//        Employee empl = employeeDB.getEmployeeByActorID(actor.getActorID());
//        System.out.println(empl.getUsername());
//        System.out.println(empl.getSalary());

//        DBCustomer customerdb = new DBCustomer();
//        for(Customer customer : customerdb.getObjects())
//        {
//            System.out.println(customer.getCustomerID() + " " + customer.getRole());
//        }
//        DBProduct productDB = new DBProduct();
//        ArrayList<Car> cars = productDB.getProductsCarOpel("Opel");
//        ArrayList<CarColor> carcolor = productDB.getCarColor();
//        ArrayList<CarEngine> carengines = productDB.getCarEngine();
//
//        System.out.println("Cars:");
//        for (Car car : cars)
//        {
//
//            System.out.println(car.getCarID());
//        }
//
//        System.out.println("CarColors:");
//           for (CarColor carColor : carcolor)
//        {
//
//            System.out.println(carColor.getColor());
//        }
//
//
//         System.out.println("CarEngines:");
//           for (CarEngine carengine : carengines)
//        {
//
//            System.out.println(carengine.getEngineSize());
//        }


//        for (Actor a : actors)
//        {
//            System.out.println(a.getActorID() + " " + a.getName() + " " + a.getEmail());
//            System.out.print("Roller: ");
//            for (Role role : a.getRoles())
//            {
//                System.out.print(role.getRole() + " ");
//            }
//            System.out.println();
//        }
//
//
//
//        System.out.println("----------- employee");
//
//        DBEmployee employeeDB = new DBEmployee();
//        ArrayList<Employee> empl = employeeDB.getObjects();
//         for (Employee e : empl) {
//                    System.out.println(e.getEmployeeID());
//
//        }

//        HelperMethods helper = new HelperMethods();
//        String value = helper.MD5Hash("12345");
//        System.out.println(value);
    }
}
